package com.ty.day6;

import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 * Author : txy
 * Create 2023/11/2 17:08
 */
public class Four {
    public static void main(String[] args) {
        double money, bonus = 0;
        Scanner sc = new Scanner(System.in);
        System.out.println("输入利润(单位万元)：");
        money = sc.nextDouble();
        if (money < 0) {
            System.out.println("像您这样的大老板输入的利润不应该为负数！");
            return;
        } else if (money <= 10) {
            bonus = bonus + money * 0.1;
        } else if (money <= 20) {
            bonus = bonus + 10 * 0.1 + (money - 10) * 0.075;
        } else if (money <= 40) {
            bonus = bonus + 10 * 0.1 + 10 * 0.075 + (money - 20) * 0.05;
        } else if (money <= 60) {
            bonus = bonus + 10 * 0.1 + 10 * 0.075 + 20 * 0.05 + (money - 40) * 0.03;
        } else if (money <= 100) {
            bonus = bonus + 10 * 0.1 + 10 * 0.075 + 20 * 0.05 + 20 * 0.03 + (money - 60) * 0.015;
        } else {
            bonus = bonus + 10 * 0.1 + 10 * 0.075 + 20 * 0.05 + 20 * 0.03 + 40 * 0.015 + (money - 100) * 0.01;
        }
        System.out.println("奖金为：" + bonus + "万元");
    }
}
